package com.nuc.bigdata.service;

import com.nuc.bigdata.orm.entity.Picture;
import org.springframework.web.multipart.MultipartFile;

import java.util.ArrayList;

/**
 * @author JackLuo
 * @date 2019/11/14
 */
public interface PictureService {

    /**
     * 单图片上传接口
     * @param file MultipartFile 网页文件选择
     * @param userId 用户id
     * @return Picture类
     */
    Picture uploadPicture(MultipartFile file,String userId);


    Picture getPicture(String pictureId);

    String getPictureUrl(Picture picture);

    String getThumbnailUrl(Picture picture);

    /**
     * 一次性上传多个文件
     * @param files 包含MultipartFile的ArrayList
     * @param userId 用户唯一标识
     * @return 图片信息的ArrayList
     */
    ArrayList<Picture> uploadManyPicture(ArrayList<MultipartFile> files,String userId);
}
